//
//  EtEventCenter.h
//  events
//
//  Created by movin on 2019/5/26.
//

#import <Foundation/Foundation.h>
#import "EtBaseEvent.h"
#import "EtHandler.h"

@interface EtEventCenter : NSObject

+(void)addListener:(nullable NSString*)key subKey:(nullable NSString*)subKey handler:(nullable  EtHandler*)handler priority:(int)priority;
+(void)removeListener:(nullable NSString*)key subKey:(nullable NSString*)subKey handler:(nullable EtHandler*)handler priority:(int)priority;
+(void)dispatch:(nullable NSString*)key subKey:(nullable NSString*)subKey evt:(nullable EtBaseEvent*)evt;
+(void)setPause:(nullable NSString*)key enabled:(bool)enabled;

+(void)clear:(nullable NSString*)key;
+(void)clear:(nullable NSString*)key subKey:(nullable NSString*)subKey listener:(nullable NSObject*)listener;

+(void)clear;

@end
